class MergesController < ApplicationController
	def create
		@fragment = Fragment.find params[:fragment_id]
		merge = Merge.new
		merge.fragment = @fragment
		merge.chapter = @fragment.chapter
		if merge.save
			@fragment.chapter.novel.create_next_chapter
			redirect_to novel_path(@fragment.chapter.novel)
		else
			redirect_to :back
		end
	end
end
